Extending Constructive Negation for Partial Functions in Lazy Functional-logic Languages
نویسنده
چکیده
In this paper the mechanism of Default Rules for narrowing-based languages proposed in 24] is adapted to lazy narrowing. Every partial deenition of a function can be completed with a default rule. In a concrete function call, the default rule is applicable when the normal ones determine that they cannot compute the value of the call. Furthermore , when the goal has variables the evaluation mechanism provides constraints to the variables to make the default rule applicable. Lazy narrowing semantics are extended with the technique of constructive negation 4, 5, 27]. The main advantage is that the coroutining implementation technique described in 5], which is the basis for an eecient implementation, can be fully formalized in our framework.
منابع مشابه
Default Rules: An Extension of Constructive Negation for Narrowing-based Languages
In this paper an extension of narrowing-based functional logic languages is proposed: Every partial deenition of a function can be completed with a default rule. In a concrete function call, the default rule is applicable when the normal ones determine that they cannot compute the value of the call. The use of the default rule, in the presence of a goal with variables, is constructive. The oper...
متن کاملA Complete Axiomatization of Strict Equality over Infinite Trees (Extended Version) Technical Report SIC-03-2009, UCM
Computing with data values that are some kind of trees — finite, infinite, rational— is at the core of declarative programming, either logic, functional or functional-logic. Understanding the logic of trees is therefore a fundamental question with impact in different aspects, like language design, including constraint systems or constructive negation, or obtaining methods for verifying and reas...
متن کاملTowards a Safe Partial Evaluation of Lazy Functional Logic Programs
Partial Evaluation is a well-known technique for specializing programs w.r.t. a given restriction of their input data. Although partial evaluation has been widely investigated in the context of functional and functional logic languages like Haskell or Curry, current schemes are either overly restrictive or destroy sharing through the specialization process, which may produce incorrect specializ...
متن کاملSpecialization of functional logic programs based on needed narrowing
Many functional logic languages are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction mechanism of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal evaluation strategy which constitutes the basis of modern (narrowing-based) lazy functional logic languages. In this work, we present the fundamentals of p...
متن کاملLink to record in
A lightweight approach to debugging functional logic programs by observations is presented, implemented for the language Curry. The Curry Object Observation System (COOSy) comprises a portable library plus a viewing tool. A programmer can observe data structures and functions by annotating expressions in his program. The possibly partial values of observed expressions that are computed during p...
متن کامل